COMMAND ANY 
AtLocation 3    ;built in compass prompt at first open room
IsCarrying 269  ;compass
FlagOFF 55      ;need bearings
VerbIsDirection ;going somewhere
PrintMessage 187 ;which way which
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocationLT 10 ;early in game
IsCarrying 269 ;the compass
FlagOFF 55     ;actually this is a temp flag
Chance 20      ;enough to bug him
VerbIsDirection ;when he cmds nsewetc
PrintMessage 187 ;how do you know which is 
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ANY
IsCarrying 269   ;compass
FlagON 55        ;cmd getbearings does this
VerbIsDirection
PrintMessage 188 ;appropriate you can go now msg
BlankLine
TurnFlagOFF 55   ;this continues
END_COMMAND

COMMAND ANY
CounterEquals 6 5 ;he has six chances to figure out dream
PrintMessage 30   ;or awakens without flame
BlankLine
Destroy 252       ;in case he takes it 
GoToRoom 2        ;back to sealed room
TurnCounterOFF 6  ;not needed anymore
DoneWithTurn
END_COMMAND

COMMAND ANY
Present 301       ;if he's got the camel
FlagON 3          ;and he's riding it
VerbIsDirection   ;he asks it to go some way 
PrintMessage 19   ;he is told he can't steer
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 2    ;in cell
FlagOFF 14      
TurnFlagON 14   ;suffocation possible
TurnCounterON 5 ;how long it takes
END_COMMAND

COMMAND ANY
AtLocation 2      ;only in cell
CounterEquals 5 5 
PrintMessage 67   ;air is oppresive
BlankLine     
Delay 3           ;establish sluggishness
END_COMMAND

COMMAND ANY
AtLocation 2
CounterEquals 5 8 ;worry about air going
Delay 2           ;sluggishness
PrintMessage 68   ;drowsy
BlankLine
TurnFlagON 15     ;temp flag, chance to sleep
END_COMMAND

COMMAND ANY
AtLocation 2       ;cell
CounterEquals 5 16 ;sixteen chances
Delay 2            ;then he's out of air
PrintMessage 71    ;so informed
BlankLine
KillPlayer
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 25      ;lighthouse dream
FlagON 39          ;the outside approach version
FlagOFF 66         ;bipolar flag so dream can be returned to
TurnCounterON 20   ;currently set to twelve
TurnFlagON 66      ;bpfl
END_COMMAND

COMMAND ANY
CounterEquals 20 12 ;plenty of time--tested
FlagON 31          ;this is is mouse is healed
PrintMessage 230   ;you return to courtyard
BlankLine         
SendToRoom 317 54  ;there's your mouse
GoToRoom 54        ;in the courtyard
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 20 12 ;same as above rat is not healed
PrintMessage 230    ;you awaken
BlankLine
GoToRoom 54         ;courtyard
DoneWithTurn
END_COMMAND

COMMAND ANY
FlagOFF 16      ;if he's here the first time
AtLocation 25   ;at lighthouse 
Present 302     ;and the maiden is there
PrintMessage 66 ;she sees storm, begs him to throw switch
BlankLine   
TurnCounterON 13 ;this is destiny... he can't throw switch, she must
TurnFlagON 16   ;now it's happened
END_COMMAND

COMMAND ANY
AtLocation 25      ;at lighthouse
CounterEquals 13 4 ;4th turn
PrintMessage 141   ;girl pulls switch, is blasted into light
Delay 12           ;drama
AddToGroup 302     ;this gets maiden
GoToRoom 21        ;in morning scene
SendToRoom 230 21  ;also flower
TurnFlagON 40      ;she turned lighthouse
DoneWithTurn
END_COMMAND

COMMAND ANY 
AtLocation 3    ;the ruined cell
TurnFlagOFF 14
TurnCounterOFF 5
RelocateAll 2 3 ;gets all the furnishings of cell
Destroy 205     ;except the seed
END_COMMAND

COMMAND ANY     
AtLocation 4    ;stepping out of the ruins      
PrintMessage 5  ;into the desert--sees storm
Delay 8         ;ta-dahh
Blankline       ;
PrintMessage 6  ;but then the storm subsides
Blankline
GoToRoom 5      ;now you're in the killing desert
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocationGT 4  ;in the killing desert
AtLocationLT 9  ;----
FlagOFF 2       ;
PrintMessage 7  ;The sun beats down
BlankLine
TurnFlagON 2    ;now vulnerable
TurnCounterON 1 ;player's dehydration
TurnCounterON 2 ;mouse's
END_COMMAND

COMMAND ANY
CounterEquals 1 10 ;
PrintMessage 8     ;you stumble, lose strngth
BlankLine
END_COMMAND

COMMAND ANY
CounterEquals 1 14 ;
PrintMessage 9     ;sorry, you're dead
KillPlayer
DoneWithTurn
END_COMMAND

COMMAND ANY
Present 209
CounterEquals 2 1      ;mouse's dehydration
SwapLocations 209 213  ;first mouse for thirsty mouse
END_COMMAND

COMMAND ANY
Present 317            ;this is if he's managed to get the flame
CounterEquals 2 1
SwapLocations 317 213
END_COMMAND

COMMAND ANY
CounterEquals 2 15     ;player has a generous moves
SwapLocations 213 214  ;switch for dead mouse
END_COMMAND

COMMAND ANY
AtLocation 5  ;first desert
FlagOFF 72
Present 301   ;has tamed camel
PrintMessage 48
BlankLine
PutInCurrentRoom 329 ;bedouin
TurnFlagON 72
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 5    ;desert
Present 329     ;bedouin
VerbIsDirection ;you leave
PrintMessage 87 ;and he goes the opposite way
BlankLine
Destroy 329     ;he's gone
END_COMMAND

COMMAND ANY
AtLocation 9      
VerbIsDirection        ;wandering in circles
PrintMessage 64
BlankLine
END_COMMAND

COMMAND ANY              
AtLocation 10         ;oasis
FlagOFF 6             ;
PrintMessage 26       ;air darkens, cloud comes
BlankLine
PutInCurrentRoom 226  ;cloud
TurnFlagON 6          ;only
TurnCounterON 3       ;countdown till beast kills
END_COMMAND

COMMAND ANY
AtLocation 10
CounterEquals 3 3     ;
PrintMessage 27       ;getting darker
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 10
CounterEquals 3 6
PrintMessage 27       ;getting darker
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 10
CounterEquals 3 10    ;twig snaps
PrintMessage 28
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 10
CounterEquals 3 22
PrintMessage 29       ;beast kills
BlankLine
KillPlayer
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 11      ;road above dardhad
Present 312        ;fading girl
Present 309        ;healed boy 
PrintMessage 167
BlankLine
PrintMessage 175
BlankLine
Destroy 312
SwapLocations 309 308
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 11
Present 312
PrintMessage 167
BlankLine
Destroy 312
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 12   ;campfire
FlagOFF 29
TurnFlagON 29
TurnCounterON 10 ;increments to sleep
END_COMMAND

COMMAND ANY
CounterEquals 10 6 
IsCarrying 209    ;injured mouse
PrintMessage 235  ;this is the fetch hint
BlankLine
DropIt 209        
DropIt 201
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 10 8 ;Mustapha yacks forevr
Present 317        ;the mouse
PrintMessage 110   ;final exhaustion
BlankLine 
GoToRoom 13        ;off to dreamland
RelocateAll 1 272  ;relocate possession
Destroy 317        ;mouse not in dream
TurnFlagON 10      ;your dreaming
SetVariableTo 1 0  ;maiden variable
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 10 8 ;Mustapha yacks forevr
PrintMessage 110   ;final exhaustion
BlankLine 
GoToRoom 13        ;off to dreamland
RelocateAll 1 272  ;relocate possession
TurnFlagON 10      ;your dreaming
TurnCounterOFF 10
SetVariableTo 1 0  ;maiden variable
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 15   ;maiden's house
FlagOFF 8       ;---
PrintMessage 43 ;foreshadowing
BlankLine
TurnFlagON 8    ;This happens once
TurnCounterON 4 ;counting down her appearance
END_COMMAND

COMMAND ANY
AtLocation 15         ;dream house 
CounterEquals 4 6     ;he must be there six turns
Delay 4
PrintMessage 44       ;her magical appearance
BlankLine
PutInCurrentRoom 302  ;maiden
DescribeThing 302     ;------
BlankLine           
END_COMMAND

COMMAND ANY
IsCarryingNothing     ;if he's empty handed
AtLocation 15         ;at her house
CounterEquals 4 10    ;and its the tenth turn
PrintMessage 49       ;she sets out food
BlankLine
PutInCurrentRoom 233  ;full bowl
PutInCurrentRoom 236  ;bread
PutInCurrentRoom 241  ;spoon
TurnFlagON 11
END_COMMAND

COMMAND ANY
Present 302
FlagON 12             ;she plays, will he compliment5 1        
CounterGT 5 1         ;if he does dishes
CounterLT 5 5         ;within a short time
PrintMessage 56       ;meal over she sits and plays
CounterEquals 5 5     ;listening turns flag off
PrintMessage 48       ;you haven't listened
BlankLine         
TurnFlagOFF 12        ;this all runs it's course
TurnCounterOFF 5      ;no need to count
END_COMMAND

COMMAND ANY
Present 302
VariableEquals 1 5    ;if he's done five right things
PrintMessage 41       ;she suggests you go for walk
BlankLine            
SetVariableTo 1 0     ;done counting
AddToGroup 302        ;it's a date
END_COMMAND 

COMMAND ANY
CounterEquals 7 3     ;he's read tree, turned that counter on
PrintMessage 85
BlankLine
SendToRoom 304 10     ;here is the stranger
TurnCounterOFF 7
END_COMMAND

COMMAND ANY           
CounterEquals 8 4     ;counter since talked about cloud    
PrintMessage 79       ;takes out match     
BlankLine
PutInCurrentRoom 253  ;match
END_COMMAND

COMMAND ANY
CounterEquals 8 8     ;missed the chance?
PrintMessage 82       ;stranger loses interests
BlankLine
Destroy 304           ;he's out of there
Destroy 253           ;with all his...
Destroy 254           ;accutrments
TurnCounterOFF 8
END_COMMAND

COMMAND ANY
AtLocation 20     ;he's taken her into shallows
FlagON 22         ;he's freed her from stone
PrintMessage 54   ;she spies boat
GoToRoom 21       ;player wakes to morning with girl
SendToRoom 230 21 ;and finds flower
DoneWithTurn
END_COMMAND

COMMAND ANY
IsCarrying 278    ;you have the gold coin
NOT Present 319   ;the begger not there
SwapLocations 278 279 ;gold for copper
END_COMMAND

COMMAND ANY
FlagON 68         ;goldcopper dichotomy
IsCarrying 279    ;asimi
Present 319       ;begger
SwapLocations 279 278 ;you're a richer man for it
END_COMMAND

COMMAND ANY
FlagON 39           ;approach by sea
FlagOFF 41
SendToRoom 221 21   ;creates oasis scene
SendToRoom 223 21
SendToRoom 224 21
SendToRoom 225 21
SendToRoom 229 21
Destroy 259
TurnFlagON 41
END_COMMAND

COMMAND ANY
AtLocation 21         ;he's slept night at oasis
FlagOFF 41
PutInCurrentRoom 221
PutInCurrentRoom 223
PutInCurrentRoom 224
PutInCurrentRoom 225
TurnFlagON 41
END_COMMAND

COMMAND ANY
AtLocation 27    ;maiden with you at sign
FlagOFF 33
Present 302
PrintMessage 129
TurnFlagON 33
END_COMMAND

COMMAND ANY
FlagON 51     ;riding on carpet
PrintMessage 210   ;from carpet...
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 37  ;if he arrives in dardhad
FlagOFF 52     ;event flag
FlagON 51      ;riding on carpet
PrintMessage 171
TurnCounterON 15  ;paces event
TurnFlagOFF 48
TurnFlagOFF 49
TurnFlagOFF 51
TurnFlagON 52 
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 15  3 ;paces dardhad event
Present 317
Delay 5
PrintMessage 172
BlankLine
SendTreasuresToRoom 2 4
Destroy 317
GoToRoom 40
SendToRoom 316 40
SendToRoom 270 40
TurnCounterOFF 15
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 15  3 ;paces dardhad event
Delay 5
PrintMessage 172
BlankLine
SendTreasuresToRoom 2 4
SendToRoom 316 40
SendToRoom 270 40
GoToRoom 40
TurnCounterOFF 15
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 39      ;on pumice road
FlagON 39          ;he's coming from sea
VerbIsDirection    ;he wants to travel road
NOT IsWearing 238  ;shoes
PrintMessage 161   ;feet can't take it
BlankLine          ;so you no go jose
DoneWithTurn       
END_COMMAND

COMMAND ANY
AtLocation 31      ;at boy's place on road
FlagOFF 36         
Present 302        ;girl is with you
PrintMessage 130   ;he sees her
TurnFlagON 36
END_COMMAND

COMMAND ANY         
AtLocation 32      ;on spire
FlagOFF 37        
TurnCounterON 11   ;times roc's arrival
TurnFlagON 37
END_COMMAND

COMMAND ANY
AtLocation 32
CounterEquals 11 2 ;misgivings
PrintMessage 135
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 32
CounterEquals 11 3   
PutInCurrentRoom 310 ;roc here
DescribeThing 310    ;looks like
BlankLine
PrintMessage 136     ;grabs and carries
Delay 15
BlankLine
GoToRoom 33          ;to ocean
TurnCounterOFF 1
TurnCounterOFF 2
TurnCounterOFF 11
TurnFlagON 39      ;signifies approach from ocean
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 33      ;in ocean
FlagON 46
FlagOFF 26         ;he hasn't yet gotten flame
FlagOFF 44         ;has met sailor?
Chance 20          ;there's a chance
PrintMessage 146
BlankLine
PutInCurrentRoom 315 ;old sailor in tub
TurnCounterON 21
TurnFlagON 44      ;never again
END_COMMAND

COMMAND ANY
AtLocation 33       ;in ocean
CounterEquals 21 5  ;5 chances to talk
PrintMessage 149    ;he drifts off
BlankLine
Destroy 315
TurnCounterOFF 21
END_COMMAND

COMMAND ANY
AtLocation 33    ;in the ocean
FlagOFF 46       ;can drown
PrintMessage 143 ;you thrash around
BlankLine
TurnCounterON 14 ;he has a time limit to set load weight
TurnFlagON 46    ;he's vulnerable
END_COMMAND

COMMAND ANY
AtLocation 33
CounterEquals 14 6 ;he has only three chances to drop right things
PrintMessage 144   ;you drown shoes were heaviest
KillPlayer
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 19 3  ;mendicant is healing mouse
PrintMessage 206    ;it is healed
BlankLine
SwapLocations 209 317 ;heals
TurnFlagOFF 62     ;no longer can observe healing
TurnFlagOFF 63     ;offer completed
TurnCounterOFF 19  ;another complete counter
Destroy 252        ;flame
PutInCurrentRoom 317  ;you have the mouse
TurnFlagON 31      ;healed mouse now exists
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 33    
IsCarrying 209
PrintMessage 138
Delay 10
BlankLine
Destroy 209
END_COMMAND

COMMAND ANY
AtLocation 33
IsCarrying 213
PrintMessage 138
Delay 10
BlankLine
Destroy 213
END_COMMAND

COMMAND ANY
AtLocation 33
IsCarrying 317
PrintMessage 138
BlankLine
Destroy 317
END_COMMAND

COMMAND ANY
AtLocationGT 33     ;coral courtyard
AtLocationLT 36     ;seahorse barn
CounterEquals 12 3  ;down three turns
PrintMessage 137    ;lungs about to burst
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 36
Present 302
Present 309
FlagOFF 74
PrintMessage 33    ;led back to the seaside
BlankLine
RemoveFromGroup 309 ;Gladys and douglas decide to stay
Destroy 302         ;technical re groopmemberprob
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 36   ;at rocky coast
Present 302     ;dream maiden
FlagOFF 74
PrintMessage 150
BlankLine 
TurnFlagON 74
DoneWithTurn
END_COMMAND

COMMAND ANY
FlagON 51   ;riding carpet
VerbIsDirection
PrintMessage 169 ;rug dont know nesw
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ANY
FlagON 48       ;on rug
VerbIsDirection 
PrintMessage 165 ;you step off rug
BlankLine      
TurnFlagOFF 48   ;no longer on rug
END_COMMAND

COMMAND ANY 
AtLocation 41  ;street of thieves
FlagOFF 56 ;permanent flag
VerbIsDirection
SendTreasuresToRoom 45 4
PrintMessage 193
TurnFlagON 56  ;will blessedly only happen once
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 28
 OR
AtLocation 29
NOT FirstVisitToRoom ;insures showroom always
LookAtRoom
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 30
Present 312       ;fading girl     
FlagOFF 76
PrintMessage 131  ;blows merchants mind
BlankLine
TurnFlagON 76
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 40  ;dungeon
NOT Present 317 ;Spotted mouse
Present 277    ;stinky cheese
FlagON 31       ;mouse has been healed
FlagOFF 54      ;permanent flag
PrintMessage 196 ;you are hurt and hungry
BlankLine
TurnCounterON 17 ;coundown to mouse
TurnFlagON 54
END_COMMAND

COMMAND ANY
AtLocation 40 ;dungeon
CounterEquals 17 9 ;a while
PrintMessage 182     ;mouse arrives and eats the cheese
BlankLine
PutInCurrentRoom 317 ;the mouse
Destroy 277 ;cheese
END_COMMAND

COMMAND ANY
AtLocation 40
FlagOFF 31
PrintMessage 80
EndGame
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 22 8   ;match burns 8 turns
PrintMessage 76      ;too hot, you drop it
BlankLine
Destroy 253          ;it goes out
PutInCurrentRoom 257 ;the unlit match
TurnCounterOFF 22
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 37
FlagON 78  ;just came from etheopean
FlagOFF 69 ;has never had the match
Chance 40
PrintMessage 183
BlankLine
PutInCurrentRoom 257
TurnFlagON 69  ;this covers him on match
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 41  ;street of thieve
NOT Present 279
VerbIsDirection
Chance 30      
PrintMessage 195  ;you find asimi
BlankLine
PutInCurrentRoom 279 ;asimi
DoneWithTurn
END_COMMAND

COMMAND ANY
VerbIsDirection
IsClosed 282   ;eyes
PrintMessage 209  ;open your eyes
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ANY
Present 319    ;the mendicant
AtLocation 42  ;street of fine wares
FlagOFF 59       ;permanent flag
Chance 33
PrintMessage 197 ;you see show
BlankLine
TurnFlagON 59
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 45 ;at shop
FlagON 57   ;begger has led you to courtyard
FlagOFF 32
NOT Present 319
Chance 20   
PrintMessage 233
BlankLine
PutInCurrentRoom 319 ;begger
TurnFlagON 32
DoneWithTurn
END_COMMAND

COMMAND ANY
IsCarrying 273
CounterEquals 16 12    ;air has been let in chamber
SwapLocations 273 274  ;the book becomes blank
DescribeThing 274
BlankLine
END_COMMAND

COMMAND ANY
AtLocation 60  ;sluice
GoToRoom 58    ;alley
DoneWithTurn
END_COMMAND

COMMAND ANY
AtLocation 67   ;slanting roof
GoToRoom 54     ;courtyard
DoneWithTurn
END_COMMAND

COMMAND ANYBODY, ANY
NOT NamePresent
PrintMessage 201
DoneWithTurn
END_COMMAND

COMMAND ANYBODY, FETCH ANY
NOT NameIsNumber 317
PrintMessage 202
BlankLine
END_COMMAND

COMMAND ANYBODY, FETCH ANY
RedirectTo FETCH $NOUN$
END_COMMAND

COMMAND FETCH KEY RING
AtLocation 38       ;at gate
Present 270
Present 317
PrintMessage 174    ;good idea and its working, until... 
BlankLine           ;loud clatter wakes guard
Delay 10            ;and you're captured
PrintMessage 172
BlankLine
Destroy 317         ;to come back anew
SendTreasuresToRoom 2 4
SendToRoom 316 40
SendToRoom 270 40
GoToRoom 40         ;sent to jail
DoneWithTurn
END_COMMAND

COMMAND FETCH KEY RING
AtLocation 40       ;in dungeon
Present 270         ;keys
Present 317         ;spotted mouse
PrintMessage 184    ;it works like a charm
BlankLine
GetIt 270
DoneWithTurn
END_COMMAND

COMMAND FETCH KEY RING
AtLocation 38 
 OR
AtLocation 40
PrintMessage 173
BlankLine
DoneWithTurn
END_COMMAND

COMMAND FETCH STONE
Present 317
Present 201
NOT IsCarrying 201
PrintMessage 246
BlankLine
GetIt 201
DoneWithTurn
END_COMMAND

COMMAND FETCH MATCH
Present 317
Present 257
NOT IsCarrying 257
PrintMessage 246
BlankLine
GetIt 257
DoneWithTurn
END_COMMAND

COMMAND TAKE KEY
AtLocation 38
 OR
AtLocation 40
PrintMessage 173  ;can't reach from here
BlankLine
DoneWithTurn
END_COMMAND

COMMAND TAKE COMPASS
IsCarrying 269    ;compass
PrintMessage 189  ;new message, using wd bearings
BlankLine
TurnFlagON 55     ;temp bearings flag/to be offed immediately
DoneWithTurn
END_COMMAND

COMMAND TAKE MOUSE
Present 209
PrintMessage 4
GetIt 209
DoneWithTurn
END_COMMAND

COMMAND TAKE MOUSE
Present 317
PrintMessage 4
BlankLine
DoneWithTurn
END_COMMAND

COMMAND TAKE MATCH
AtLocation 10
Present 253
PrintMessage 83
Destroy 304
Destroy 253
Destroy 254
TurnCounterOFF 8
DoneWithTurn
END_COMMAND

COMMAND TAKE FIREWOOD
FlagON 18
TurnFlagOFF 18
END_COMMAND

COMMAND TAKE ANY
NOUNPresent
IsClosed 282   ;eyes
PrintMessage 209 ;should open eyes
BlankLine
DoneWithTurn
END_COMMAND

COMMAND TAKE ANY
AtLocation 45  ;shop
NOUNPresent    ;if it's there
PrintMessage 213  ;you grope and alarm keeper
BlankLine
DoneWithTurn
END_COMMAND

COMMAND READ COMPASS
ReDirectTo TAKE COMPASS
END_COMMAND

COMMAND READ TREE
AtLocation 10     ;only at twilight scene
Present 221       ;if it's there
FlagOFF 19        ;
TurnCounterON 7   ;start count for stranger
TurnFlagON 19     ;just once please
END_COMMAND

COMMAND DRINK WATER
AtLocationGT 4    ;in first desert expanse 
AtLocationLT 9    ;
PrintMessage 11   ;it quenches
TurnCounterOFF 1  ;death counter off
DoneWithTurn
END_COMMAND

COMMAND GIVE WATER TO MOUSE
FlagON 31         ;this is the healthy mouse
Present 213       ;same as above for mouse
AtLocationGT 4
AtLocationLT 9
CounterLT 2 20
PrintMessage  121
SwapLocations 213 317
TurnCounterOFF 2
DoneWithTurn
END_COMMAND

COMMAND GIVE WATER TO MOUSE
Present 213       ;same as above for mouse
AtLocationGT 4
AtLocationLT 9
CounterLT 2 20
PrintMessage 17
SwapLocations 213 209
TurnCounterOFF 2
DoneWithTurn
END_COMMAND

COMMAND GIVE WATER TO MOUSE
Present 209     ;any place other than desert
 OR
Present 317
PrintMessage 65
DoneWithTurn
END_COMMAND

COMMAND GIVE TREE TO MOUSE
ReDirectTo BREAK TREE WITH MOUSE
END_COMMAND

COMMAND GIVE CAMEL TO BEDOUIN
Present 329  ;bedouin
FlagON 73    ;you've asked about match
PrintMessage 107 ;he thanks you and gives match
BlankLine
Destroy 329   ;he leaves
Destroy 301   ;with camel
GetIt 257     ;and you get match
TurnCounterOFF 23  ;that's that
TurnFlagON 69
DoneWithTurn
END_COMMAND

COMMAND GIVE CAMEL TO BEDOUIN
Present 329      ;bedouin
PrintMessage 105 ;
BlankLine
Destroy 329
Destroy 301
TurnCounterOFF 23
DoneWithTurn
END_COMMAND

COMMAND GIVE LANTERN TO TRAVELLER
FlagOFF 27
Present 216
Present 305
PrintMessage 100
BlankLine
Destroy 216
DoneWithTurn
END_COMMAND

COMMAND GIVE FLOWER TO MAIDEN
Present 230
IsGroupMember 302   ;if you give her flower after joining
PrintMessage 47     ;she slaps you awake
BlankLine
Delay 3
PrintMessage 46     ;and you come awake in dead of night
BlankLine
GoToRoom 19         ;that's this room
RelocateAll 2 1     ;get back pocket possessions
SendToRoom 230 13   ;thr flower goes back to meadow
RemoveFromGroup 302 ;the girl is lost
SendToRoom 302 25
DoneWithTurn  
END_COMMAND

COMMAND GIVE FLOWER TO MAIDEN
Present 230
Present 302         ;not group member
PrintMessage 47     ;otherwise proceed
BlankLine
PrintMessage 46
BlankLine
Destroy 302
GoToRoom 19
RelocateAll 2 1
SendToRoom 256 17
SendToRoom 230 13
DoneWithTurn
END_COMMAND

COMMAND GIVE RING TO MAIDEN
FlagON 13
IsGroupMember 302
Destroy 215 ;ring
PrintMessage 62
BlankLine
SendToRoom 230 21  ;note this get's flower
GoToRoom 21
RemoveFromGroup 302
SendToRoom 302 25
TurnFlagON 45      ;gave ring
DoneWithTurn
END_COMMAND

COMMAND GIVE RING TO MAIDEN
IsGroupMember 302
Destroy 215 ;ring
PrintMessage 62
BlankLine
SendToRoom 230 21
GoToRoom 21
RemoveFromGroup 302
SendToRoom 302 25
TurnFlagON 45
DoneWithTurn
END_COMMAND

COMMAND GIVE RING TO MAIDEN
Present 302 ;maiden
Destroy 215 ;ring
PrintMessage 62
BlankLine
GoToRoom 21
TurnFlagON 45
DoneWithTurn
END_COMMAND

COMMAND GIVE ASIMI TO MENDICANT
IsCarrying 279  ;asimi
Present 319     ;beger
FlagOFF 68
FlagON 59       ;show has happened
PrintMessage 199 ;he turns coin to gold
BlankLine
SwapLocations 279 278 ;copper for gold
TurnFlagON 68    ;launches goldcopper dichot
DoneWithTurn
END_COMMAND

COMMAND GIVE MOUSE TO MENDICANT
Present 319    ;begger
Present 209    ;injured mouse 
FlagOFF 62     ;something to observe?
FlagON 63      ;offer has been made
PrintMessage 204
BlankLine
PutInCurrentRoom 252 ;flame
DropIt 209     ;the mouse
TurnFlagON 62 ;his window for observing method of flame
TurnCounterON 19  ;he'll have two turns to observe method
TurnFlagON 31    ;mouse gets healed
DoneWithTurn
END_COMMAND

COMMAND KISS MAIDEN
IsGroupMember 302
PrintMessage 46
BlankLine
SendToRoom 230 13
GoToRoom 19
RelocateAll 2 1
RemoveFromGroup 302
SendToRoom 302 17
DoneWithTurn
END_COMMAND

COMMAND KISS MAIDEN
AtLocation 15
PrintMessage 46
BlankLine
DropEverything
Delay 4
GoToRoom 19
RelocateALL 2 1
DoneWithTurn
END_COMMAND

COMMAND UNTANGLE LINT
PrintMessage 1
PutInCurrentRoom 205
DoneWithTurn
END_COMMAND

COMMAND DROP MOUSE
Present 317     ;spotted mouse
PrintMessage 154
DoneWithTurn
END_COMMAND

COMMAND DROP ANY
AtLocation 33    ;in the sea
NOUNIsCarrying   ;if you have it
PrintMessage 152 ;you jettison it
BlankLine
SendNOUNToRoom 34 ;and they go to sea floor
DoneWithTurn
END_COMMAND

COMMAND PLAY FLUTE
IsCarrying 202
Present 300
FlagOFF 1
PrintMessage 14
DoneWithTurn
END_COMMAND

COMMAND PLAY FLUTE 
IsCarrying 202
Present 300
FlagON 1
PrintMessage 16
SwapLocations 300 301
DoneWithTurn
END_COMMAND

COMMAND PLAY HORNPIPE
IsSomewhere 255     ;created hornpipe by listening
Present 256         ;the statue
Present 242         ;the harp
Destroy 256         ;transforms statue
PutInCurrentRoom 302 ;into maiden
AddToGroup 302       ;and she joins with you
PrintMessage 89      ;herewith the tale
DropIt 242
TurnFlagON 22        
DoneWithTurn
END_COMMAND

COMMAND PRACTICE FLUTE
TurnFlagON 1
PrintMessage 15
DoneWithTurn
END_COMMAND

COMMAND RIDE CAMEL
AtLocation 9
Present 301      ;the camel has become tame
FlagON 5         ;has sifted
TurnFlagON 3    
PrintMessage 24
GoToRoom 10      ;oasis
Destroy 301      
TurnFlagOFF 3
DoneWithTurn
END_COMMAND

COMMAND RIDE CAMEL
AtLocation 9
Present 216
 OR
Present 220
PrintMessage 125
BlankLine
DoneWithTurn
END_COMMAND

COMMAND RIDE CAMEL
Present 301      
TurnFlagON 3
PrintMessage 18
GoToRoom 9
SendToRoom 211 9
DoneWithTurn
END_COMMAND

COMMAND RIDE SEAHORSE
Present 311
PrintMessage 58
BlankLine
GoToRoom 36
TurnCounterOFF 12
DoneWithTurn
END_COMMAND

COMMAND RIDE CART
Present 264  ;repaired cart
PrintMessage 231
BlankLine
SwapLocations 264 261
PutInCurrentRoom 262 ;wheel
DoneWithTurn
END_COMMAND

COMMAND EXAMINE DONKEY
Present 307       ;donkey
Present 312       ;maiden
Present 309
DescribeThing 307 ;donkey
BlankLine
PrintMessage 117  ;its a sad scene she says
BlankLine 
Delay 3
PrintMessage 120  ;she goes to heal donkey
PrintMessage 175  ;alfred reacts
BlankLine
Destroy 312       ;she disappears
SwapLocations 309 308
DoneWithTurn
END_COMMAND

COMMAND EXAMINE DONKEY
Present 307       ;donkey
Present 312       ;maiden
DescribeThing 307 ;donkey
BlankLine
PrintMessage 117  ;its a sad scene she says
BlankLine 
Delay 3
PrintMessage 120  ;she goes to heal donkey
BlankLine
Destroy 312       ;she disappears
DoneWithTurn
END_COMMAND

COMMAND EXAMINE FLAME
Present 252   ;its here
IsClosed 282  ;eyes-they must be
PrintMessage 222 ;you peek, no flame
BlankLine
OpenIt 282    ;eyes
Destroy 252   ;flame
DoneWithTurn
END_COMMAND

COMMAND EXAMINE MAIDEN
Present 302
AtLocation 21
 OR
AtLocationGT 26
DescribeThing 302
BlankLine
PrintMessage 128
DoneWithTurn
END_COMMAND

COMMAND EXAMINE CARPET
Present 265     ;persian carpet
FlagOFF 47      ;is it unrolled?
PrintMessage 153
DoneWithTurn
END_COMMAND

COMMAND EXAMINE CARPET
Present 265
FlagON 47
FlagON 49
DescribeThing 265
BlankLine
PrintMessage 160
BlankLine
DoneWithTurn
END_COMMAND

COMMAND EXAMINE CARPET
Present 265
FlagON 47
DescribeThing 265
DoneWithTurn
END_COMMAND

COMMAND EXAMINE MENDICANT
Present 319 ;mendicant
FlagON 62   ;window of opportunity for observation
PrintMessage 205 ;you see the method--all except visualization
BlankLine
DoneWithTurn
END_COMMAND

COMMAND EXAMINE MOUSE
Present 317  ;mouse being healed
FlagON 62    ;window of op
PrintMessage 207  ;describes mouse 
BlankLine
DoneWithTurn
END_COMMAND

COMMAND EXAMINE ANY
FlagON 3
NOUNPresent
PrintMessage 127  ;
DoneWithTurn
END_COMMAND

COMMAND EXAMINE ANY
FlagON 51    ;he's riding carpet
NOUNPresent
NOT NOUNIsCarrying
PrintMessage 168
BlankLine
DoneWithTurn
END_COMMAND

COMMAND EXAMINE ANY
IsClosed 282  ;eyes
PrintMessage 209
BlankLine
DoneWithTurn
END_COMMAND

COMMAND STOP CAMEL
FlagON 3
Present 301
PrintMessage 20
BlankLine
TurnFlagOFF 3
LookAtRoom 
BlankLine
DescribeThing 218
DoneWithTurn
END_COMMAND

COMMAND STOP CARPET
FlagON 51
Present 265
PrintMessage 164
BlankLine
TurnFlagOFF 47   ;roll carpet
TurnFlagOFF 48   ;your not on it anymore
TurnFlagOFF 49   ;it doesn't hover
TurnFlagOFF 51   ;hence not ready to ride
DoneWithTurn
END_COMMAND

COMMAND FOLLOW HOOF PRINTS
FlagON 3          ;riding
PrintMessage 19   ;you know how to steer
BlankLine
DoneWithTurn
END_COMMAND

COMMAND FOLLOW HOOF PRINTS
Present 218
PrintMessage 21
BlankLine
PutInCurrentRoom 216
Destroy 218
PrintMessage 22
DoneWithTurn
END_COMMAND

COMMAND FOLLOW FOOT PRINTS
AtLocation 21
DescribeThing 259
BlankLine
GoToRoom 27
DoneWithTurn
END_COMMAND

COMMAND RUB LANTERN
Present 216 ;lamp
FlagOFF 4
PutInCurrentRoom 217
DescribeThing 217
BlankLine
PutInCurrentRoom 219
DescribeThing 219
TurnFlagON 4
DoneWithTurn
END_COMMAND

COMMAND SIFT SAND
Present 220      ;pan
Present 211      ;sand
Chance 20
TurnFlagON 5
PutInCurrentRoom 215  ;ring
DescribeThing 215     
DoneWithTurn
END_COMMAND

COMMAND SIFT SAND
Present 220
Present 211
FlagOFF 5
PrintMessage 124
BlankLine
DoneWithTurn
END_COMMAND

COMMAND SIFT SACK
AtLocation 72   ;in kitchen
Present 287     ;flour
PrintMessage 98
BlankLine
GoToRoom 41
TurnFlagON 78   ;set up for finding match
DoneWithTurn
END_COMMAND

COMMAND BREAK BRANCH
Present 222
Destroy 222
PutInCurrentRoom 228
DescribeThing 228
DoneWithTurn
END_COMMAND

COMMAND BREAK BREAD 
Present 302   ;maiden
Present 236   ;bread
PrintMessage 57
Destroy 236
AddToVariable 1 1
DoneWithTurn
END_COMMAND

COMMAND BREAK DOOR
Present 276  ;metal panel door
IsWearing 238 ;those famous shoes
PrintMessage 180
BlankLine
TurnCounterON 16 ;air erases book
Destroy 276
DoneWithTurn
END_COMMAND

COMMAND BREAK TREE WITH MOUSE
Present 280  ;tree
Present 209  ;injured mouse
Present 319  ;mendicant
FlagOFF 63   ;offer to heal mouse, permanent
PrintMessage 200 ;mendicant sees mouse, offers to heal
BlankLine
TurnFlagON 63 ;offer now extended
DoneWithTurn
END_COMMAND

COMMAND BREAK MIRROR WITH COMPASS
ReDirectTo THROW COMPASS AT MIRROR
END_COMMAND

COMMAND PUT POLE IN PIT 
AtLocation 10       ;at oasis
SomethingInside 224 ;the pit
PrintMessage 91     ;it's full
DoneWithTurn        ;that's all
END_COMMAND

COMMAND PUT POLE IN PIT
AtLocation 10       ;
Delay 3
PrintMessage 31       ;lightning hits it
SwapLocations 225 227 ;it becomes burning pole
BlankLine
DescribeThing 227
DoneWithTurn
END_COMMAND

COMMAND PUT GRASS IN PIT
Present 229
FlagOFF 17            ;just to mark the 
PrintMessage 72
TurnFlagON 17
SendToRoom 229 224
DoneWithTurn
END_COMMAND

COMMAND PUT FIREWOOD IN PIT
Present 228
FlagOFF 18
PrintMessage 73
TurnFlagON 18
SendToRoom 228 224
DoneWithTurn
END_COMMAND

COMMAND PUT FLAME IN REFLECTOR
AtLocation 25
Present 252
FlagON 31
FlagON 39
PrintMessage 218
BlankLine
TurnFlagON 13   ;so magii will know
SendToRoom 230 54
SendToRoom 317 54
GoToRoom 54
OpenIt 282
Destroy 252
TurnCounterOFF 20
DoneWithTurn
END_COMMAND

COMMAND PUT FLAME IN REFLECTOR
AtLocation 25
Present 252
PrintMessage 218
BlankLine
TurnFlagON 13    ;so magii will know
GetIt 230        ;flower
GoToRoom 54
OpenIt 282
TurnCounterOFF 20
DoneWithTurn
END_COMMAND

COMMAND LIGHT FIREWOOD WITH BURNING POLE
Present 227
Present 228
PrintMessage 75
DoneWithTurn
END_COMMAND

COMMAND LIGHT FIREWOOD WITH MATCH
Present 253       ;match
Present 228       ;firewood
PrintMessage 75   ;doesn't do it
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
Present 227
FlagOFF 17
PrintMessage 74
Destroy 229
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
Present 229
Present 227
FlagON 17
FlagOFF 18
PrintMessage 74
Destroy 229
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
FlagON 25        ;he's lit pipe
Present 229      ;there's tinder
Present 227      ;there's a burning pole
FlagON 17        ;tinder
FlagON 18        ;and wood are in pit
PrintMessage 32  ;you light fire
Destroy 228      ;so won't remain in AM
Destroy 229      ;ditto
SwapLocations 227 225 ;burning for regular pole
GoToRoom 12      ;circle of firelight
BlankLine 
SendToRoom 305 12 ;you inherit this guy
TurnCounterOFF 3
TurnFlagON 27     ;mustapha is freely rambling on
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
Present 229
Present 227
FlagON 17
FlagON 18
PrintMessage 32
GoToRoom 12
Destroy 228
Destroy 229
SwapLocations 227 225
TurnCounterOFF 3
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
Present 253     ;it's still there
Present 229
FlagOFF 17      ;it isn't in pit yet,grass that is
PrintMessage 74 ;it burns up
Destroy 229     ;it's gone, inidentally, you're dead
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
Present 253     ;same as last command
Present 229
FlagON 17       ;grass is in pit
FlagOFF 18      ;firewood not
PrintMessage 74 ;same aweful results
Destroy 229
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
FlagON 25        ;has lit mustaphas pipe
Present 253
Present 229
FlagON 17
FlagON 18        
PrintMessage 32  ;success, you graduate to next room
Destroy 228
Destroy 229
SwapLocations 253 257
GoToRoom 12
BlankLine
SendToRoom 305 12
TurnCounterOFF 3
TurnFlagON 27    ;mustapha is rambling freely on
DoneWithTurn
END_COMMAND

COMMAND LIGHT GRASS 
Present 253
Present 229
FlagON 17
FlagON 18        
PrintMessage 32  ;success, you graduate to next room
Destroy 228
Destroy 229
SwapLocations 253 257
GoToRoom 12
TurnCounterOFF 3
DoneWithTurn
END_COMMAND

COMMAND LIGHT PIPE
FlagOFF 25
IsCarrying 253
PrintMessage 92
TurnFlagON 25
DoneWithTurn
END_COMMAND

COMMAND LIGHT MATCH
ReDirectTo STRIKE MATCH
END_COMMAND

COMMAND SLEEP
AtLocation 2
FlagON 15
GoToRoom 26
TurnFlagOFF 15
TurnCounterON 6
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 12      ;Campsite
FlagON 27          ;mustapha rambles
PrintMessage 93    ;he drones on and on--should listen
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 12     ;campsite
Present 317       ;his buddy the mouse
RelocateAll 1 272 ;empty his pockets
Destroy 317       ;get it out of dream
PrintMessage 216  ;generic sleep message
BlankLine
GoToRoom 13       ;your in dream
TurnFlagON 10
TurnCounterOFF 10
SetVariableTo 1 0
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 12
RelocateAll 1 272
PrintMessage 216
BlankLIne
GoToRoom 13
TurnFlagON 10
TurnCounterOFF 10
SetVariableTo 1 0
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 19
PrintMessage 50
BlankLine
GoToRoom 16
RelocateAll 1 272
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 54  ;cortyard
FlagON 39
Present 317
PrintMessage 216
BlankLine
GoToRoom 22    ;end of land
Destroy 317
Destroy 303       ;removes old man-to be animated
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 54  ;cortyard
FlagON 39      ;app by sea, not had dream
PrintMessage 216
BlankLine
GoToRoom 22    ;end of land
Destroy 303       ;removes old man-to be animated
DoneWithTurn
END_COMMAND

COMMAND SLEEP
AtLocation 54 ;courtyard
Present 319 ;begger
PrintMessage 166 ;you sleep awhile, no dream
BlankLine
Destroy 319 ;he leaves
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 16
Present 302
PrintMessage 63
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 16
Chance 25
PrintMessage 60 ;(*You finnaly arrive at tower*)
BlankLine
GoToRoom 22
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 16
RandomMessage 35 39
DoneWithTurn
END_COMMAND

COMMAND NORTH
Present 302
Present 309
AtLocation 27
FlagOFF 28
SwapLocations 302 312
PrintMessage 106
BlankLine
PrintMessage 88
BlankLine
SetVariableTo 2 1
GoToRoom 28
TurnFlagON 28
DoneWithTurn
END_COMMAND

COMMAND NORTH
Present 302
AtLocation 27
FlagOFF 28
SwapLocations 302 312
PrintMessage 106
BlankLine
SetVariableTo 2 1
GoToRoom 28
TurnFlagON 28
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 27
FlagOFF 28
PrintMessage 106
BlankLine
SetVariableTo 2 1
GoToRoom 28
TurnFlagON 28
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 28
VariableEquals 2 7
GoToRoom 30
TurnFlagOFF 28
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 28
AddToVariable 2 1
DoneWithTurn
END_COMMAND

COMMAND NORTH
AtLocation 44
PrintMessage 207
BlankLine
DoneWithTurn
END_COMMAND

COMMAND SOUTH
AtLocation 28
VariableEquals 2 0
GoToRoom 27
TurnFlagOFF 28
DoneWithTurn
END_COMMAND

COMMAND SOUTH
AtLocation 28
PrintMessage 108
BlankLine
SubtractFromVariable 2 1
DoneWithTurn
END_COMMAND

COMMAND SOUTH
AtLocation 30
FlagOFF 28
PrintMessage 108
BlankLine
GoToRoom 28
SubtractFromVariable 2 1
TurnFlagON 28
DoneWithTurn
END_COMMAND

COMMAND SOUTH
AtLocation 71  ;slopyard
FlagOFF 77
PrintMessage 223 ;ethiopean greets, offers work
BlankLine
GoToRoom 72
TurnFlagON 77
TurnFlagON 78
DoneWithTurn
END_COMMAND

COMMAND SOUTHEAST
AtLocation 27
FlagOFF 30
PrintMessage 10
BlankLine   
SetVariableTo 2 1
GoToRoom 29
TurnFlagON 30
DoneWithTurn
END_COMMAND

COMMAND SOUTHEAST
AtLocation 29
VariableEquals 2 7
GoToRoom 31
TurnFlagOFF 30
DoneWithTurn
END_COMMAND

COMMAND SOUTHEAST
AtLocation 39   ;at rocky coast
Present 302     ;dream maiden
PrintMessage 150
BlankLine 
GoToRoom 36
DoneWithTurn
END_COMMAND

COMMAND SOUTHEAST
AtLocation 29
AddToVariable 2 1
DoneWithTurn
END_COMMAND

COMMAND SOUTHWEST
FirstVisitToRoom 6
Destroy 212
SendToRoom 300 7
END_COMMAND

COMMAND NORTHWEST
AtLocation 29
VariableEquals 2 0
GoToRoom 27
TurnFlagOFF 30
DoneWithTurn
END_COMMAND

COMMAND NORTHWEST
AtLocation 29
SubtractFromVariable 2 1
DoneWithTurn
END_COMMAND

COMMAND NORTHWEST
AtLocation 31
FlagON 39
GoToRoom 29
SetVariableTo 2 7
DoneWithTurn
END_COMMAND

COMMAND NORTHWEST
AtLocation 31
FlagOFF 30
PrintMessage 25
BlankLine
GoToRoom 29
TurnFlagON 30
DoneWithTurn
END_COMMAND

COMMAND NORTHWEST
AtLocation 42  ;street of fine wares
FlagOFF 57     ;hasn't been taken by begger yet
PrintMessage 190 ;you wander close and twisting maze of streets
BlankLine
DoneWithTurn   
END_COMMAND

COMMAND SOUTHEAST
AtLocation 54    ;courtyard
PrintMessage 192 ;jump fence negotiate neighb
GoToRoom 42      ;street of fine wares
BlankLine
DoneWithTurn
END_COMMAND

COMMAND EAST
AtLocation 40  ;dungeon
IsLocked 275   ;dungeon door
PrintMessage 181 ;no go
BlankLine
DoneWithTurn
END_COMMAND

COMMAND DOWN
AtLocation 33
FlagOFF 38
TurnCounterON 12
PrintMessage 59
BlankLine
TurnFlagON 38
GoToRoom 34
DoneWithTurn
END_COMMAND

COMMAND UP
AtLocation 34
TurnCounterOFF 12
TurnFlagOFF 38
GoToRoom 33
DoneWithTurn
END_COMMAND

COMMAND EAT PORRIDGE
Present 233
Present 302
FlagON 11
PrintMessage 42
SwapLocations 233 237
DoneWithTurn
END_COMMAND

COMMAND EAT TREE
Present 280 ;tree
Present 209 ;
PrintMessage 215
BlankLine
PrintMessage 240
BlankLine
DoneWithTurn
END_COMMAND

COMMAND EAT TREE
Present 280 ;tree
PrintMessage 215
BlankLine
DoneWithTurn
END_COMMAND

COMMAND THANK MAIDEN
FlagON 11
PrintMessage 51
BlankLine
AddToVariable 1 1
DoneWithTurn
END_COMMAND

COMMAND COMPLIMENT MAIDEN
FlagON 12
PrintMessage 51
BlankLine
PrintMessage 52
AddToVariable 1 1
TurnFlagOFF 12
TurnCounterOFF 5
DoneWithTurn
END_COMMAND

COMMAND LISTEN
Present 305
FlagON 27
RandomMessage 102 103
DoneWithTurn
END_COMMAND

COMMAND LISTEN 
AtLocation 15
FlagON 12
PrintMessage 51
BlankLine
AddToVariable 1 1
TurnCounterOFF 5
DoneWithTurn
END_COMMAND

COMMAND LISTEN
AtLocation 20
FlagOFF 23
PutInCurrentRoom 255
DescribeThing 255    ;the hornpipe
BlankLine
TurnFlagON 23
DoneWithTurn
END_COMMAND

COMMAND TALK TO STRANGER ABOUT CLOUD
Present 304
FlagOFF 21
PrintMessage 78
PutInCurrentRoom 254
TurnFlagON 21
TurnCounterON 8
DoneWithTurn
END_COMMAND

COMMAND ASK BEDOUIN ABOUT CAMEL
Present 329   ;Bedouin-camel presence implied
PrintMessage 96
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BEDOUIN ABOUT MATCH
Present 329
PrintMessage 97
TurnFlagON 73
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BEDOUIN ABOUT SELF
Present 329
IsNowhere 281
PrintMessage 241
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BEDOUIN ABOUT ANY
Present 329
PrintMessage 226
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT CARPET
Present 319
 OR
Present 327
PrintMessage 244
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT BIRDBATH
AtLocation 54   ;in courtyard
Present 319     ;begger
 OR
Present 327
PrintMessage 214 ;history version of deposing
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT TREE
AtLocation 54
ReDirectTo ASK MENDICANT ABOUT BIRDBATH
END_COMMAND

COMMAND ASK MENDICANT ABOUT TREE
Present 319      ;begger
 OR
Present 327
FlagOFF 57       ;permanent flag
PrintMessage 194 ;leads you through maze
BlankLine
GoToRoom 54      ;courtyard
SendToRoom 319 54 ;begger
TurnFlagON 57    ;now you can find way on own
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT FLAME
Present 319   ;begger
Present 317   ;can only be because mendicant healed
PrintMessage 220 ;begger challenges him to actualize dream
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT FLAME
Present 319
FlagON 59  ;there has been show
PrintMessage 198
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT STONE
Present 319 ;begger
 OR
Present 327
Present 201 ;stone
PrintMessage 224
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT COMPASS
Present 319
 OR
Present 327
Present 269
PrintMessage 227
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT BOTTLE
Present 319
 OR
Present 327
Present 203
PrintMessage 225
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT COIN
Present 319
 OR
Present 327
Present 278
PrintMessage 228
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT SELF
IsNowhere 281   ;self dumminoun
Present 319
 OR
Present 327
PrintMessage 232
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MENDICANT ABOUT ANY
Present 319 ;begger
 OR
Present 327
NOUNPresent
PrintMessage 226  ;doesn't know nada
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK TRAVELLER ABOUT SELF
IsNowhere 281   ;self dumminoun
PrintMessage 99
BlankLine
TurnFlagOFF 27
DoneWithTurn
END_COMMAND

COMMAND ASK TRAVELLER ABOUT CROWD
Present 305
FlagOFF 27
PrintMessage 242
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK TRAVELLER ABOUT KING
Present 305
FlagOFF 27
PrintMessage 148
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK TRAVELLER ABOUT HABIB
ReDirectTo ASK TRAVELLER ABOUT KING
END_COMMAND

COMMAND ASK TRAVELLER ABOUT ANY
Present 305
FlagON 27
PrintMessage 101
DoneWithTurn
END_COMMAND

COMMAND ASK STRANGER ABOUT CLOUD
Present 304
FlagOFF 21
PrintMessage 78
PutInCurrentRoom 254
TurnFlagON 21
TurnCounterON 8
DoneWithTurn
END_COMMAND

COMMAND ASK STRANGER ABOUT PIT
Present 304
PrintMessage 84
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK STRANGER ABOUT SELF
Present 304
IsNowhere 281
PrintMessage 226
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK STRANGER ABOUT ANY
Present 304
NOUNIsSomewhere
PrintMessage 77
DoneWithTurn
END_COMMAND

COMMAND ASK GENIE ABOUT WISHES
Present 217
PrintMessage 23
PutInCurrentRoom 220
Destroy 217
Destroy 219
DoneWithTurn
END_COMMAND

COMMAND ASK GENIE ABOUT ANY
Present 217
PrintMessage 241
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MAIDEN ABOUT SELF
IsNowhere 281
Present 302
PrintMessage 70
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MAIDEN ABOUT PICTURE
Present 302
PrintMessage 45
AddToVariable 1 1
DoneWithTurn
END_COMMAND

COMMAND ASK MAIDEN ABOUT DONKEY
ReDirectTo EXAMINE DONKEY
END_COMMAND

COMMAND ASK MAIDEN ABOUT ANY
AtLocation 26
PrintMessage 12
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MAIDEN ABOUT ANY
Present 302
PrintMessage 241
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MERCHANT ABOUT CART
AtLocation 30
PrintMessage 111
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MERCHANT ABOUT DONKEY
AtLocation 30
PrintMessage 112
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MERCHANT ABOUT SELF
AtLocation 30
IsNowhere 281
PrintMessage 241
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK MERCHANT ABOUT ANY
AtLocation 30
PrintMessage 241
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT CARPET
Present 308
Present 265
PrintMessage 118
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT SELF
IsNowhere 281
Present 308
Present 302
PrintMessage 119
BlankLine
PrintMessage 117
BlankLine
Delay 10
Tone 660 100
PrintMessage 13
BlankLine
SwapLocations 308 309 ;boy healed by maiden
AddToGroup 309
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT SELF
IsNowhere 281
Present 308
PrintMessage 119
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT MAIDEN
Present 308
Present 302
PrintMessage 132
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT MAIDEN
Present 309   ;been healed
Present 302
PrintMessage 249
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT MAIDEN
Present 309
Present 312
PrintMessage 250
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK BOY ABOUT ANY
Present 302
PrintMessage 226
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK SAILOR ABOUT SELF
IsNowhere 281
Present 315
PrintMessage 147
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK SAILOR ABOUT KING
PrintMessage 148
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK SAILOR ABOUT HABIB
PrintMessage 148
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK SAILOR ABOUT ANY
PrintMessage 122
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK ATTENDANT ABOUT COMPASS
Present 318   ;keeper
Present 269   ;compass
NOT IsCarrying  269 ;compass
PrintMessage 212  ;costs only one kapok
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK ATTENDANT ABOUT MATCH
Present 318
Present 257
NOT IsCarrying 257
PrintMessage 2
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK ATTENDANT ABOUT SELF
Present 318
 OR
Present 320
PrintMessage 226
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK ATTENDANT ABOUT ANY
Present 318   ;he's there
NOUNPresent
NOT NOUNIsCarrying  ;excluding his own
NOT NOUNIsNumber 272  ;and not the case
PrintMessage 211
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK ATTENDANT ABOUT ANY
Present 320    ;camel lot attendant
PrintMessage 241
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK HABIB ABOUT ANY
Present 326
PrintMessage 3
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK URCHIN ABOUT SELF
Present 323    ;urchin
IsNowhere 281  ;like, selfness, man
PrintMessage 245
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ASK URCHIN ABOUT ANY
Present 323
Present 317  ;the mouse
PrintMessage 248
BlankLine
DoneWithTurn
END_COMMAND

COMMAND TELL MAIDEN ABOUT BOAT
FlagON 22
NOT AtLocation 20
PrintMessage 90
BlankLine
DoneWithTurn
END_COMMAND

COMMAND TELL MAIDEN ABOUT BOAT
Present 302
NOT AtLocation 20
PrintMessage 53
DoneWithTurn
END_COMMAND

COMMAND TELL MAIDEN ABOUT BOAT
AtLocation 20
PrintMessage 54
BlankLine
RemoveFromGroup 302
GoToRoom 21
DoneWithTurn
END_COMMAND

COMMAND TELL MAIDEN ABOUT LIGHTHOUSE
FlagON 13
Present 302
PrintMessage 61
DoneWithTurn
END_COMMAND

COMMAND WASH BOWL 
AtLocation 15         ;in maiden's cottage
FlagOFF 12            ;you know
PrintMessage 55       ;wash bowl and spoon
BlankLine
SwapLocations 237 243 ;clean and dirty bowls
SwapLocations 241 244 ;clean and dirty spoon
TurnFlagON 12         ;it bees done
TurnCounterON 5       ;time lapses while she plays harp
AddToVariable 1 2     ;brownie point
DoneWithTurn
END_COMMAND
 
COMMAND PULL SWITCH
AtLocation 25
Present 302           ;if the girl's there
PrintMessage 140      ;old man block's way
DoneWithTurn
END_COMMAND

COMMAND PULL SWITCH
AtLocation 25        ;at lighthouse
NOT Present 303      ;he has been preblitzed by prev cmd check
FlagON 39            ;courtyard dream
PrintMessage 217      ;you go to do it
BlankLine
Delay 4
SwapLocations 250 303 ;bones for man
PrintMessage 140      ;he prevents you
BlankLine
DoneWithTurn
END_COMMAND

COMMAND PULL SWITCH
AtLocation 25  
FlagON 39      ;courtyard dream
Present 303    ;man is there
PrintMessage 140    ;he prevents you
BlankLine
DoneWithTurn
END_COMMAND

COMMAND PULL SWITCH
AtLocation 25         ;lighthouse
TurnFlagON 13         ;he's done it
END_COMMAND

COMMAND PULL LINE
AtLocation 38
Present 266
Present 317
FlagON 15
PrintMessage 154
BlankLine
PrintMessage 172
BlankLine
Destroy 266
Destroy 317
SendTreasuresToRoom 2 4
SendToRoom 316 40
SendToRoom 270 40
GoToRoom 40
DoneWithTurn
END_COMMAND

COMMAND PULL LINE
AtLocation 38
Present 266
FlagON 15
PrintMessage 154
BlankLine
PrintMessage 172
BlankLine
Destroy 266
SendTreasuresToRoom 2 4
SendToRoom 316 40
SendToRoom 270 40
GoToRoom 40
DoneWithTurn
END_COMMAND

COMMAND EXHALE FLAME
FlagOFF 26            ;this is to tag ability for final score
IsClosed 282          ;eyes
FlagON 61             ;visualizing
GetIt 252             ;flame
PrintMessage 94       ;here's how it goes
BlankLine
TurnFlagON 26         ;now magii will know
DoneWithTurn
END_COMMAND

COMMAND EXHALE FLAME
IsClosed 282          ;eyes
FlagON 61             ;visualizing
GetIt 252             ;flame
PrintMessage 94       ;here's how it goes
DoneWithTurn
END_COMMAND

COMMAND BORROW MATCH
Present 253           ;if it exists
PrintMessage 81       ;stranger gives it
GetIt 253             ;so you get it
TurnCounterOFF 8      ;opportunity to do it
TurnFlagON 69         ;has match
DoneWithTurn
END_COMMAND

COMMAND LIFT BOARD
Present 288
PrintMessage 243
BlankLine
RelocateAll 2 1
DoneWithTurn
END_COMMAND

COMMAND LIFT CART  
AtLocation 30         ;scene on road only
SomethingInside 261   ;the rugs are aboard
PrintMessage 113      ;it's too heavy
DoneWithTurn
END_COMMAND

COMMAND LIFT CART  
AtLocation 30         ;scene on road north
Present 261           ;busted cart
PrintMessage 114      ;you lift it
Destroy 262           ;no more wheel
SwapLocations 261 264 ;busted for fixed cart  
SendToRoom 263 264    ;put rugs in cart
TurnFlagON 34         ;this will never happen again
DoneWithTurn
END_COMMAND

COMMAND UNLOAD CART
IsLocated 263 261     ;if rugs are in cart
IsSomewhere 209       ;mouse hasn't died
NOT IsCarrying 209
PrintMessage 115      ;you unload cart
BlankLine
PrintMessage 116      ;and find mouse
PutInCurrentRoom 209  ;injured mouse
PutInCurrentRoom 201  ;stone
GetIt 263             ;rugs
DropIt 263            ;unload them
DoneWithTurn
END_COMMAND

COMMAND UNLOAD CART 
IsLocated 263 261
PrintMessage 115
GetIt 263
DropIt 263
DoneWithTurn
END_COMMAND

COMMAND CLIMB SPIRE
Present 231
IsWearing 238
PrintMessage 133
BlankLine
DoneWithTurn
END_COMMAND

COMMAND CLIMB SPIRE
Present 231
Present 301
Destroy 301
PrintMessage 134
GoToRoom 32
DoneWithTurn
END_COMMAND

COMMAND CLIMB SPIRE
Present 231
PrintMessage 134
BlankLine
GoToRoom 32
DoneWithTurn
END_COMMAND

COMMAND SUMMON ANY
IsClosed 282
FlagON 61
IsCarrying 201  ;summoning stone
NOT AtLocation 56
PrintMessage 34
BlankLine
PutNOUNInCurrentRoom
OpenIt 282
TurnFlagOFF 61
DoneWithTurn
END_COMMAND

COMMAND SWIM
AtLocation 33
LoadWeightGT 10
PrintMessage 145
BlankLine
DoneWithTurn
END_COMMAND

COMMAND SWIM
AtLocation 33
PrintMessage 151
TurnCounterOFF 14
TurnFlagON 46
DoneWithTurn
END_COMMAND

COMMAND UNROLL CARPET
Present 265
FlagOFF 47
PrintMessage 154
BlankLine
DescribeThing 265
TurnFlagON 47
DoneWithTurn
END_COMMAND

COMMAND ROLL CARPET
Present 265
FlagON 49
PrintMessage 179
BlankLine
DoneWithTurn
END_COMMAND

COMMAND ROLL CARPET
Present 265
FlagON 47
PrintMessage 154
TurnFlagOFF 47
DoneWithTurn
END_COMMAND

COMMAND REMOVE SHOES
IsWearing 238     ;ceremonial shoes
RemoveIt 238
PrintMessage 154 ;verb the noun message
BlankLine
PrintMessage 155 ;dont misplace wizards gifts
DoneWithTurn
END_COMMAND

COMMAND STEP ON CARPET
Present 265    ;the rug is here
FlagON 49      ;and hovering
IsWearing 238  ;he is wearing shoes
PrintMessage 158 ;it sags
BlankLine
TurnFlagOFF 49  ;it no longer hovers
TurnFlagOFF 48  ;he is no longer on carpet
DoneWithTurn
END_COMMAND

COMMAND STEP ON CARPET
Present 265      ;carpet
FlagON 49        ;it hovers
PrintMessage 159 ;it stays firm underfoot
BlankLine        
TurnFlagON 50    ;he's standing on rug, ready pratfall
DoneWithTurn
END_COMMAND

COMMAND STEP ON CARPET
Present 265       ;carpet
FlagON 47         ;unrolled
PrintMessage 156  ;you step on it, don't know what to expect
BlankLine         ;expect nothing, it's not hovering
TurnFlagON 48     ;you are on carpet
DoneWithTurn
END_COMMAND

COMMAND SIT ON CARPET
Present 265    ;the rug is here
FlagON 49      ;and hovering
IsWearing 238  ;he is wearing shoes
PrintMessage 158 ;it sags
BlankLine
TurnFlagOFF 49  ;it no longer hovers
DoneWithTurn
END_COMMAND

COMMAND SIT ON CARPET
Present 265      ;carpet
FlagON 50        ;he's standing
FlagON 49        ;it hovers
PrintMessage 159 ;it stays firm underfoot
BlankLine        
TurnFlagOFF 50    ;he's sitting, OK to travel
DoneWithTurn
END_COMMAND

COMMAND SIT ON CARPET
Present 265      ;carpet
FlagON 49        ;it hovers
PrintMessage 159 ;it stays firm underfoot
BlankLine        
PrintMessage 162 ;say where prompt
TurnFlagON 51    ;ready to fly
DoneWithTurn
END_COMMAND

COMMAND SIT ON CARPET
Present 265       ;carpet
FlagON 47         ;unrolled
PrintMessage 156  ;you step on it, don't know what to expect
BlankLine         ;expect nothing, it's not hovering
TurnFlagON 48     ;you are on carpet
DoneWithTurn
END_COMMAND

COMMAND SAY STONE
IsSomewhere 201 ;the stone-synon/zalaam
Present 265     ;flying carpet
FlagOFF 49      ;hovering?
FlagON 47       ;is unrolled
FlagOFF 48      ;he's not standing on it
PrintMessage 157 ;it rises to receive you
BlankLine
TurnFlagON 49   ;it hovers now
AddToGroup 265  ;it remains obedient
DoneWithTurn
END_COMMAND

COMMAND SAY SAND
FlagON 51      ;ready to fly
FlagON 49      ;it hovers
IsSomewhere 211 ;sand (synonymous with desert)
PrintMessage 163
BlankLine
GoToRoom 5
SendToRoom 265 5 
DoneWithTurn
END_COMMAND

COMMAND SAY SUNDIAL
FlagON 51      ;ready to fly
FlagON 49      ;it hovers
IsSomewhere 289 ;sand (synonymous with desert)
PrintMessage 163
BlankLine
GoToRoom 51
SendToRoom 265 51 
DoneWithTurn
END_COMMAND

COMMAND SAY SIGN
FlagON 51      ;ready to fly
FlagON 49      ;it hovers
IsSomewhere 260 ;sign/crossorads
PrintMessage 163
BlankLine
GoToRoom 27
SendToRoom 265 27
DoneWithTurn
END_COMMAND

COMMAND SAY CROWD
FlagON 70     ;healed king
FlagOn 51
FlagON 49
IsSomewhere 313
VariableGT  3 2  ;healing record at 3
Tone 440 100
PrintMessage 163
BlankLine
PrintMessage 229 ;reunion with king
BlankLine
WinGame
DoneWithTurn
END_COMMAND

COMMAND SAY CROWD
FlagON 51      ;ready to fly
FlagON 49      ;it hovers
IsSomewhere 313 ;Crowd/dardhad
PrintMessage 163
BlankLine
GoToRoom 37
SendToRoom 265 37
DoneWithTurn
END_COMMAND

COMMAND SAY ANY
FlagON 51   ;riding carpet
NOUNIsSomewhere
PrintMessage 170
BlankLine 
DoneWithTurn
END_COMMAND

COMMAND THROW LINE AT KEY RING
Present 266
Present 270
AtLocation 38
Chance 20
TurnFlagON 15
PrintMessage 177
BlankLine
DoneWithTurn
END_COMMAND

COMMAND THROW LINE AT KEY RING
Present 266
Present 270
AtLocation 38
FlagOFF 15
PrintMessage 178
BlankLine
DoneWithTurn
END_COMMAND

COMMAND THROW COMPASS AT MIRROR
Present 251        ;intact mirror
Present 269        ;compass
PrintMessage 86
BlankLine
SwapLocations 251 286
SwapLocations 324 326
DropIt 269        ;because you threw it
TurnFlagON 70     ;for final judgement
AddToVariable 3 1
DoneWithTurn
END_COMMAND

COMMAND MEMORIZE BOOK
Present 273     ;ancient diary
FlagOFF 53
PrintMessage 154  ;possibly a more detailed msg leading to brick
BlankLine
PrintMessage 186
SendToRoom 284 48   ;loose brick to junction
TurnFlagON 53
DoneWithTurn
END_COMMAND

COMMAND BUY MATCH
AtLocation 45
Present 257 
IsCarrying 279
PrintMessage 154
BlankLine
Destroy 279
GetIt 257
DoneWithTurn
END_COMMAND

COMMAND BUY COMPASS
AtLocation 45  ;shop
Present 269 ;compass
NOT IsCarrying 269  ;Compass
PrintMessage 109 ;how will you do that
BlankLine
DoneWithTurn
END_COMMAND

COMMAND BUY ANY
AtLocation 45
NOUNPresent
NOT NOUNIsCarrying
NOT NOUNIsNumber 272
IsCarrying 278
PrintMessage 154
BlankLine
Destroy 278
GetNOUN
DoneWithTurn
END_COMMAND

COMMAND CLOSE EYES
AtLocation 12
ReDirectTo SLEEP
END_COMMAND

COMMAND CLOSE EYES
IsNowhere 282   ;eyes
IsOpen 282
PrintMessage 154 ;you x your y--hmmm
BlankLine
CloseIt 282    ;just for form
DoneWithTurn
END_COMMAND

COMMAND OPEN EYES
IsNowhere 282
IsClosed 282  ;eyes
FlagON 61     ;visualizing
Present 252   ; and so there is flame
PrintMessage 154 
BlankLine
Destroy 252
TurnFlagOFF 61
DoneWithTurn
END_COMMAND

COMMAND OPEN EYES
IsNowhere 282
IsClosed 282
PrintMessage 154 
BlankLine
OpenIt 282
DoneWithTurn
END_COMMAND

COMMAND VISUALIZE ANY
NOT NOUNPresent  ;no thing here yet
IsClosed 282     ;eyes closed
FlagOFF 61       ;not yet summoned vision
PrintMessage 208 ;you do this, eyes closed
BlankLine
TurnFlagON 61    ;all right, almost there
DoneWithTurn
END_COMMAND

COMMAND STRIKE MATCH
AtLocation 52 ;little room understairs
Present 257  ;unlit match
PrintMessage 154
BlankLine
LookAtRoom
SwapLocations 257 253 ;now it burns
TurnCounterON 22
DoneWithTurn
END_COMMAND

COMMAND STRIKE MATCH
Present 257  ;unlit match
PrintMessage 154
BlankLine
SwapLocations 257 253 ;now it burns
TurnCounterON 22
DoneWithTurn
END_COMMAND

COMMAND EXTINGUISH MATCH
Present 253 ;burning match
PrintMessage 154
BlankLine
SwapLocations 253 257 ;it's out
TurnCounterOFF 22
DoneWithTurn
END_COMMAND

;this will get the healing done

COMMAND HEAL BOY
Present 308    ;the blind boy
IsClosed 282   ;eyes
FlagON 61      ;visualizing flame
Present 252    ;therefore flame
PrintMessage 234 ;generic
BlankLine
DescribeThing 309
BlankLine
OpenIt 282
SwapLocations 308 309 ;it's done
Destroy 252
TurnFlagOFF 61
AddToVariable 3 1
DoneWithTurn
END_COMMAND

COMMAND HEAL DONKEY
Present 307   ;donkey
IsClosed 282  ;eyes
FlagON 61     ;vis flame
Present 252   ;flame
PrintMessage 234
BlankLine
DescribeThing 322
OpenIt 282
SwapLocations 307 322
Destroy 252
TurnFlagOFF 61
AddToVariable 3 1
DoneWithTurn
END_COMMAND

COMMAND HEAL MENDICANT
Present 319
IsClosed 282
FlagON 61
Present 252
PrintMessage 234
BlankLine
DescribeThing 327
BlankLine
OpenIt 282
SwapLocations 319 327
Destroy 252
TurnFlagOFF 61
AddToVariable 3 1
DoneWithTurn
END_COMMAND

COMMAND HEAL URCHIN
Present 323
IsClosed 282
FlagON 61
Present 252
PrintMessage 234
BlankLine
DescribeThing 328
BlankLine
OpenIt 282
SwapLocations 323 328
Destroy 252
TurnFlagOFF 61
AddToVariable 3 1
DoneWithTurn
END_COMMAND

COMMAND HEAL MOUSE
Present 209   ;injured mouse
IsClosed 282  
FlagON 61
Present 252
PrintMessage 234
BlankLine
DescribeThing 317
BlankLine
OpenIt 282
SwapLocations 209 317
Destroy 252
TurnFlagOFF 61
AddToVariable 3 1
TurnFlagON 31
DoneWithTurn
END_COMMAND

COMMAND HEAL ANY
IsClosed 282
FlagON 61
Present 252
NOUNIsCreature
NOUNPresent
PrintMessage 237
BlankLine
OpenIt 282
TurnFlagOFF 61
Destroy 252
DoneWithTurn
END_COMMAND

;the difficulty is to put in order the possible wins

COMMAND KNOCK ON DOOR
AtLocation 56
IsCarrying 201   ;stone
IsCarrying 202   ;flute
IsCarrying 203   ;bottle
IsCarrying 230   ;flower
IsCarrying 269   ;compass
FlagON 70        ;healed king
VariableGT 3 2   ;healed at least three
PrintMessage 123 ;you stand and deliver
BlankLine
Tone 440 100
PrintMessage 236 ;you veen
BlankLine
WinGame
DoneWithTurn
END_COMMAND

COMMAND KNOCK ON DOOR
AtLocation 56      ;transit house porch
FlagON 70          ;you've broken mirror-healed king
Tone 440 100
PrintMessage 185   ;this is good for a medium high win
BlankLine
WinGame            ;next wrk is scoring
DoneWithTurn
END_COMMAND

COMMAND KNOCK ON DOOR
AtLocation 56      
IsCarrying 201
IsCarrying 202
IsCarrying 203
IsCarrying 269
PrintMessage 123
BlankLine
PrintMessage 126
GetIt 258
GoToRoom 69
DoneWithTurn
END_COMMAND

COMMAND KNOCK ON DOOR
AtLocation 56
IsCarrying 269
PrintMessage 139
BlankLine
Destroy 269
GetIt 258
GoToRoom 69
DoneWithTurn
END_COMMAND


